import React, { Component } from 'react';
import './index.css';

import MainItem from '../MainItem/index.jsx';

export default class index extends Component {
  render() {
    let { list, updateTodoItem, deleteTodoItem } = this.props;
    return (
      <ul className="todo-main">
        {list.map((item) => {
          return (
            <MainItem
              listItem={item}
              key={item.id}
              updateTodoItem={updateTodoItem}
              deleteTodoItem={deleteTodoItem}
            />
          );
        })}
      </ul>
    );
  }
}
